/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package r1A2009;

import java.io.IOException;
import static chanlib.Chan_IO.*;

/**
 * @author robit
 */
public class CollectingCards{
    /*
      All neccesary to be defined
      including:
      variable, inner class
    */
    // static int A;
    // static void B();
    // static class nC
    public static long[][] nC;
    public static void nCr(int bound){
        nC=new long[bound+1][bound+1];
        nC[0][0]=1;
        for(int n=1;n<=bound;n++){
            nC[n][0]=1;
            for(int k=1;k<=n;k++){
                nC[n][k]=nC[n-1][k-1]+nC[n-1][k];
            }
        }
    }
    /*
       One calculation fits all of the cases.
    */
    static void preReckon(){
        nCr(40);
        return;
    }

    /*
      calculate the answer
    */
    private static void reckon(int line) {
        int C=Int();
        int N=Int();
        double prob[]= new double[C+1];// odd iteration's answer
        double buffer[]= new double[C+1];// even iteration's answer

        prob[0]=1;
        double ans=0;
        int MAXLOOP=1000;
        for(int t=1;t<=MAXLOOP;t++){
            //update buffer
            for(int k=0;k<C;k++){
                for(int nw=Math.max(0, N-k);nw<=Math.min(N, C-k);nw++){
                    int old=N-nw;
                    buffer[k+nw]+=prob[k]*nC[C-k][nw]*nC[k][old]/nC[C][N];
                   // nprob[k+nw]+=oprob[k]
                }
            }
            
            for(int k=0;k<=C;k++){
                prob[k]=buffer[k];
                buffer[k]=0;
            }
            ans+=t*prob[C];
        }

        //String ans = "OFF";
        String output=String.format("Case #%d: %f",line,ans);
        writeln(output, OUTFILE);
        //writeln(String.format("N=%d K=%d\n%s", N, K, ans),ANALFILE);
        //println(output);
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        /*
           Pre-computing for all cases
        */

        // Just in case!
        preReckon();
        while((char)read()!='P');

        /*
          Input-output
        */
        boolean test=false;
        boolean small=false;
        String prob="C";
        String filename;
        if(test) filename="test";
        else{
            if(small) filename=prob+"-small-practice";
            else filename=prob+"-large-practice";
        }
        try {
            /*
               Init IO,plus determination of input line number
             */
            int lineNums = initFileIO(filename);
            for (int i = 1; i <= lineNums; i++) {
                reckon(i);
            }
        } finally {
            endIO();
        }
    }

}
